package com.xx.service;

import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.awt.print.Book;
import java.util.List;

public interface BookService {

    //查询所有信息
    @Transactional(rollbackFor = Exception.class)
    List<Book> selectAll(@Param("book_name") String book_name,
                         @Param("author") String author);

    //按照姓名  模糊查询
    @Transactional(rollbackFor = Exception.class)
    List<Book> selectByName(@Param("book_name") String book_name);

    //新增图书
    @Transactional(rollbackFor = Exception.class)
    void addBook(String bookName,String author,double price) throws InterruptedException;

    //修改图书信息
    @Transactional(rollbackFor = Exception.class)
    int updateBook(@Param("book_name") String book_name,int id);
}

